
#ifndef BASE_STREAM_INCLUDED
#define BASE_STREAM_INCLUDED

#include "tcpsocket.h"

class BASE_API BaseStream : public TcpSocket
{
public:
	BaseStream(Proactor* proactor,pj_sock_t newsock);
	virtual ~BaseStream();

	int Send(const char* buff,long& size,int flags=0);
	int Recv(long size,int flags=0);

public:
	virtual pj_bool_t OnDataRead(void *data,pj_size_t size,int status,pj_size_t* remainder){return true;};
	virtual pj_bool_t OnDataSend(pj_ioqueue_op_key_t *send_key,int sendsize){return true;};
};

#endif